/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package EC;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author TrangNHIT
 */
@Entity
@Table(name = "tbAdmins")
@NamedQueries({
    @NamedQuery(name = "Admins.findAll", query = "SELECT a FROM Admins a"),
    @NamedQuery(name = "Admins.findByAdminID", query = "SELECT a FROM Admins a WHERE a.adminID = :adminID"),
    @NamedQuery(name = "Admins.findByAdminUsername", query = "SELECT a FROM Admins a WHERE a.adminUsername = :adminUsername"),
    @NamedQuery(name = "Admins.findByAdminPassword", query = "SELECT a FROM Admins a WHERE a.adminPassword = :adminPassword"),
    @NamedQuery(name = "Admins.findByAdminRole", query = "SELECT a FROM Admins a WHERE a.adminRole = :adminRole"),
    @NamedQuery(name = "Admins.findByAdminImages", query = "SELECT a FROM Admins a WHERE a.adminImages = :adminImages")})
public class Admins implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "Admin_ID")
    private Integer adminID;
    @Basic(optional = false)
    @Column(name = "Admin_Username")
    private String adminUsername;
    @Basic(optional = false)
    @Column(name = "Admin_Password")
    private String adminPassword;
    @Column(name = "Admin_Role")
    private String adminRole;
    @Column(name = "Admin_Images")
    private String adminImages;
    @OneToMany(mappedBy = "admins")
    private List<Feedbacks> feedbacksList;

    public Admins() {
    }

    public Admins(Integer adminID) {
        this.adminID = adminID;
    }

    public Admins(Integer adminID, String adminUsername, String adminPassword) {
        this.adminID = adminID;
        this.adminUsername = adminUsername;
        this.adminPassword = adminPassword;
    }

    public Integer getAdminID() {
        return adminID;
    }

    public void setAdminID(Integer adminID) {
        this.adminID = adminID;
    }

    public String getAdminUsername() {
        return adminUsername;
    }

    public void setAdminUsername(String adminUsername) {
        this.adminUsername = adminUsername;
    }

    public String getAdminPassword() {
        return adminPassword;
    }

    public void setAdminPassword(String adminPassword) {
        this.adminPassword = adminPassword;
    }

    public String getAdminRole() {
        return adminRole;
    }

    public void setAdminRole(String adminRole) {
        this.adminRole = adminRole;
    }

    public String getAdminImages() {
        return adminImages;
    }

    public void setAdminImages(String adminImages) {
        this.adminImages = adminImages;
    }

    public List<Feedbacks> getFeedbacksList() {
        return feedbacksList;
    }

    public void setFeedbacksList(List<Feedbacks> feedbacksList) {
        this.feedbacksList = feedbacksList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (adminID != null ? adminID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Admins)) {
            return false;
        }
        Admins other = (Admins) object;
        if ((this.adminID == null && other.adminID != null) || (this.adminID != null && !this.adminID.equals(other.adminID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "EC.Admins[adminID=" + adminID + "]";
    }

}
